﻿using FluentValidation;

namespace IdentityServer.Infrastructure.Validators
{
    public record ChangeMyPasswordRequest(string Password, string Password2) { }
    public class ChangeMyPasswordRequestValidatior : AbstractValidator<ChangeMyPasswordRequest>
    {
        public ChangeMyPasswordRequestValidatior()
        {
            RuleFor(x => x.Password).NotEmpty().NotNull().Equal(x => x.Password2);
            RuleFor(x => x.Password2).NotEmpty().NotNull();
        }
    }
}
